package com.ymatou.iapi.productmanager.service;

import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.MapUtil;

public class UpdateProductCheckStatusCall extends YmatouAutoTestCall{
	private static String opurl ="/api/SellerProduct/UpdateProductCheckStatus";
	
	public UpdateProductCheckStatusCall() {
		super(EnvSetup.getSystemUrl("productmanager"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	
	public JSONObject call(int sellerId,String productId){
		return this.callAndGetReturnData(MapUtil.hashMap("ProductList[0]->SellerId",sellerId,
				"ProductList[0]->ProductId",productId));
	}
	
	
	public static void main(String[] args) throws Exception {
		 JSONObject a = new UpdateProductCheckStatusCall().call(1,"2");
		 System.out.println(a.getString("response").contains("ok"));
				 
	}
	
	
	
	
	
}
